package dangs.dao;

import java.util.ArrayList;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import dangs.vo.OrderSuccessVO;

public class OrderSuccessDAO {
	private SqlMapClientTemplate client;
	public OrderSuccessDAO(SqlMapClientTemplate client){
	this.client = client;
	}
	
	public void insertOrderSuccess(OrderSuccessVO osvo){
		client.insert("insertOrderSuccess", osvo);
	}
	
	public ArrayList selectOrderSuccessByMemberId(String id){
		ArrayList list= (ArrayList)client.queryForList("selectOrderSuccessByMemberId",id);
		return list;
	}
	public int selectMaxNo(){
		int maxNo = Integer.parseInt((String)client.queryForObject("selectOrderSuccessMaxNo"));
		return maxNo;
	}
	public OrderSuccessVO selectOrderSuccessByNo(int no){
		OrderSuccessVO osvo = (OrderSuccessVO)client.queryForObject("selectOrderSuccessByNo", no);
		return osvo;
	}
}
